<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 形参默认值，当不传入参数时，使用默认值，当传入参数时，使用传入的值
        function Person(name="jack",age=5){
            this.name = name;
            this.age = age;
        }
        let  tom = new Person('tom',10);
        console.log(tom);
        let lili = new Person();
        console.log(lili);

    </script>
</body>
</html>